package com.originalpoint.origin_server.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.originalpoint.origin_server.mapper.NewsMapper;
import com.originalpoint.origin_server.pojo.Dto.NewsUMDto;
import com.originalpoint.origin_server.pojo.News;
import com.originalpoint.origin_server.service.NewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NewsImpl extends ServiceImpl<NewsMapper, News> implements NewsService {
    @Autowired
    private NewsMapper newsMapper;

    @Override
    public List<NewsUMDto> selectAllNews() {
        return newsMapper.selectAllNews();
    }

    @Override
    public void insertNews(News news) {
        newsMapper.insertNews(news);
    }
}
